<template>
  <div class="content-vue">
    <h2>message: {{ modelValue }}</h2>
    <button @click="btnChange">改变message</button>
  </div>
</template>

<script>

export default {
    emits:['update:modelValue'],
    props: {
        modelValue: {
            type: String,
            default: "父组件没有传值过来"
        }
    },
    methods: {
        btnChange() {
            this.$emit('update:modelValue', '我是修改后的值')
        }
    }
}
</script>

<style>

</style>